﻿using System.Data.Entity.ModelConfiguration;
using QDT.Core.Domain;

namespace QDT.Core.MSData.Mapping
{
    public class AdminMapping : EntityTypeConfiguration<AdminUser>
    {
        public AdminMapping()
        {
            HasKey(x => x.ID);
            Property(x => x.IsEffect).HasColumnName("is_effect");
            Property(x => x.RoleID).HasColumnName("role_id");
            Property(x => x.IsDelete).HasColumnName("is_delete");
            Property(x => x.IsDefaultAdmin).HasColumnName("is_default");
            Property(x => x.LoginTime).HasColumnName("login_time");
            Property(x => x.LoginIP).HasColumnName("login_ip");

            ToTable(DB.TPref("admin"));
        }
    }
}
